package base;

public class T2 {
    public static void main(String[] args) {
        Person person1 = new Person();
//        person1.count   不能通过类实例来访问静态变量。 只能通过类名.静态变量
        Person person2 = new Person();
        Person mhy = new MHY();
        MHY.print();
        mhy.t();
    }
}

class Person {
    private int count;
    int num;

    static public void print() {
        System.out.println("base Person");
    }

    public void t() {
        System.out.println("test");
    }

}

class MHY extends Person {
    @Override
    public void t() {
        System.out.println("HMY test");
    }
}

class Test1 {
    private int a = 10;
    int b = 20;
    static int c = 1;

    public static void main(String arg[]) {
        Test1 t = new Test1();
        System.out.println(t.c);
        t.ttt();

    }

    public void ttt() {
        System.out.println(new Test1().c);

    }
}

abstract class P {
    static final int N = 0;

}

interface PP {
    static final int N = 0;


}

